/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.cncqs.backend.applet.entity;

import org.hibernate.validator.constraints.Length;
import java.math.BigDecimal;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 食品表Entity
 * @author cxy
 * @version 2019-05-05
 */
@Table(name="applet_foods", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="school_id", attrName="schoolId", label="学校id", isQuery=false),
		@Column(name="name", attrName="name", label="食品名称", queryType=QueryType.LIKE),
		@Column(name="category", attrName="category", label="category"),
		@Column(name="price", attrName="price", label="销售单价", comment="销售单价（元）", isQuery=false),
		@Column(name="type", attrName="type", label="餐次；早中晚"),
		@Column(name="tag", attrName="tag", label="标签"),
		@Column(name="picture", attrName="picture", label="picture", isQuery=false),
		@Column(name="remarks", attrName="remarks", label="remarks", isQuery=false),
		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="update_date", isQuery=false),
	}, orderBy="a.update_date DESC"
)
public class AppletFoods extends DataEntity<AppletFoods> {
	
	private static final long serialVersionUID = 1L;
	private Long schoolId;		// 学校id
	private String name;		// 食品名称
	private Integer category;		// category
	private BigDecimal price;		// 销售单价（元）
	private Integer type;		// 餐次；早中晚
	private String picture;		// picture
	private String tag; //标签

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public AppletFoods() {
		this(null);
	}

	public AppletFoods(String id){
		super(id);
	}
	
	public Long getSchoolId() {
		return schoolId;
	}

	public void setSchoolId(Long schoolId) {
		this.schoolId = schoolId;
	}
	
	@Length(min=0, max=20, message="食品名称长度不能超过 20 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public Integer getCategory() {
		return category;
	}

	public void setCategory(Integer category) {
		this.category = category;
	}
	
	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}
	
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	
	@Length(min=0, max=255, message="picture长度不能超过 255 个字符")
	public String getPicture() {
		return picture;
	}

	public void setPicture(String picture) {
		this.picture = picture;
	}
	
}